<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      position: relative;
      width: 190px;
      height: 200px;
      margin: 100px auto;
      border: 1px solid #ccc;
      text-align: center;
      color: orangered;
      font-size: 16px;
    }

    .box i {
      position: absolute;
      top: -1px;
      left: -21px;
      width: 20px;
      height: 20px;
      border: 1px solid #ccc;
      cursor: pointer;
      /* color: orangered; */
    }
  </style>
</head>

<body>
  <div class="box">
    淘宝二维码
    <img src="img/tao.png" alt="">
    <i class="close_btn">×</i>
  </div>
  <script>
    var i = document.querySelector('i');
    var box = document.querySelector('.box');
    i.onclick = function () {
      box.style.display = 'none';
    }
  </script>
</body>

</html>